package com.csdj.t309springboot.mapper;

import com.csdj.t309springboot.entity.Employee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface EmployeeMapper {
    //    @Select("SELECT e.*,p.id as pid,p.name as pname,n.id nid,n.name nname,d.id did,d.name dname,j.id jid,j.name jname,pos.id posid,pos.name posname\n" +
//            "FROM `employee` e,nation n,politicsstatus p,department d,joblevel j,position pos\n" +
//            "where e.nationId=n.id and e.politicId=p.id and e.departmentId=d.id and e.jobLevelId=j.id and e.posid=pos.id\n" +
//            "limit #{page},#{size}")
    @Select("SELECT name \n" +
            "FROM `employee` e\n" +
            "  \n" +
            "limit #{page},#{size}")
    List<Employee> getEmpByPage(@Param("page") Integer page, @Param("size") Integer size);

    Long getTotal();

}
